package com.calvin.study.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.calvin.study.mapper.ProductMapper;
import com.calvin.study.service.IProductService;

import cloud.alibaba.study.entity.product.Product;

@Service
public class ProductService implements IProductService {

	@Autowired
	private ProductMapper productMapper;

	public Product getProductDetail(Long productId) throws Exception {
		QueryWrapper<Product> param = new QueryWrapper<Product>();
		param.eq("product_id", productId);
		return productMapper.selectOne(param);
	}
}
